package com.huawang.mdesign.model.service.util.reqif;

import com.huawang.mdesign.model.service.util.reqif.ref.SpecificationTypeRef;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * Represents a hierarchically structured requirements specification.
 *
 * @author xdl
 * @since 2023-04-04
 */
@Getter
@Setter
@XStreamAlias(ReqIFConstants.SPECIFICATION)
public class Specification extends AbstractSpecElementWithAttributes {

    /**
     * Links to next level of owned SpecHierarchy.
     */
    @XStreamAlias(ReqIFConstants.CHILDREN)
    private List<SpecHierarchy> children = new ArrayList<>();

    /**
     * The back linkage to the owning ReqIFContent element.
     */
    @XStreamOmitField
    private SpecificationType type;

    @XStreamAlias(ReqIFConstants.TYPE)
    private SpecificationTypeRef typeRef;

    /**
     * Linkage to the concrete SpecType instance.
     */
    @XStreamOmitField
    private ReqIFContent coreContent;
}
